
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module gummworld2.popup_menu</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="gummworld2.html"><font color="#ffffff">gummworld2</font></a>.popup_menu</strong></big></big> (version $Id: popup_menu.py 407 2013-08-12 15:11:30Z stabbingfinger@gmail.com $)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///C:/cygwin/home/bw/devel/python/svn/gummworld2_devel/gamelib/gummworld2/popup_menu.py">c:\cygwin\home\bw\devel\python\svn\gummworld2_devel\gamelib\gummworld2\popup_menu.py</a></font></td></tr></table>
    <p><tt>#&nbsp;This&nbsp;file&nbsp;is&nbsp;part&nbsp;of&nbsp;Gummworld2.<br>
#<br>
#&nbsp;Gummworld2&nbsp;is&nbsp;free&nbsp;software:&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and/or&nbsp;modify&nbsp;it<br>
#&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;Lesser&nbsp;General&nbsp;Public&nbsp;License&nbsp;as&nbsp;published<br>
#&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation,&nbsp;either&nbsp;version&nbsp;3&nbsp;of&nbsp;the&nbsp;License,&nbsp;or<br>
#&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.<br>
#<br>
#&nbsp;Gummworld2&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,<br>
#&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of<br>
#&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the<br>
#&nbsp;GNU&nbsp;Lesser&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.<br>
#<br>
#&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;Lesser&nbsp;General&nbsp;Public<br>
#&nbsp;License&nbsp;along&nbsp;with&nbsp;Gummworld2.&nbsp;&nbsp;If&nbsp;not,&nbsp;see&nbsp;&lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="gummworld2.data.html">gummworld2.data</a><br>
</td><td width="25%" valign=top><a href="pygame.html">pygame</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gummworld2.popup_menu.html#Menu">Menu</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.popup_menu.html#MenuItem">MenuItem</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.popup_menu.html#PopupMenu">PopupMenu</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gummworld2.popup_menu.html#NonBlockingPopupMenu">NonBlockingPopupMenu</a>
</font></dt></dl>
</dd>
</dl>
</dd>
<dt><font face="helvetica, arial"><a href="__builtin__.html#str">__builtin__.str</a>(<a href="__builtin__.html#basestring">__builtin__.basestring</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gummworld2.popup_menu.html#SubmenuLabel">SubmenuLabel</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Menu">class <strong>Menu</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>popup_menu.<a href="#Menu">Menu</a><br>
<a href="#Menu">Menu</a>(pos,&nbsp;name,&nbsp;items)&nbsp;:&nbsp;return&nbsp;menu<br>
&nbsp;<br>
pos&nbsp;-&gt;&nbsp;(x,y);&nbsp;topleft&nbsp;coordinates&nbsp;of&nbsp;the&nbsp;menu.<br>
name&nbsp;-&gt;&nbsp;<a href="__builtin__.html#str">str</a>;&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;menu.<br>
items&nbsp;-&gt;&nbsp;list;&nbsp;a&nbsp;list&nbsp;containing&nbsp;strings&nbsp;for&nbsp;menu&nbsp;items&nbsp;labels.<br>
&nbsp;<br>
This&nbsp;class&nbsp;is&nbsp;not&nbsp;intended&nbsp;to&nbsp;be&nbsp;used&nbsp;directly.&nbsp;Use&nbsp;<a href="#PopupMenu">PopupMenu</a>&nbsp;or<br>
<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a>&nbsp;instead,&nbsp;unless&nbsp;designing&nbsp;your&nbsp;own&nbsp;subclass.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Menu-__init__"><strong>__init__</strong></a>(self, pos, name, items)</dt></dl>

<dl><dt><a name="Menu-check_collision"><strong>check_collision</strong></a>(self, mouse_pos)</dt></dl>

<dl><dt><a name="Menu-draw"><strong>draw</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="MenuItem">class <strong>MenuItem</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>popup_menu.<a href="#MenuItem">MenuItem</a><br>
<a href="#MenuItem">MenuItem</a>(text,&nbsp;item_id)&nbsp;:&nbsp;return&nbsp;menu_item<br>
&nbsp;<br>
text&nbsp;-&gt;&nbsp;<a href="__builtin__.html#str">str</a>;&nbsp;the&nbsp;display&nbsp;text.<br>
item_id&nbsp;-&gt;&nbsp;int;&nbsp;the&nbsp;numeric&nbsp;ID;&nbsp;also&nbsp;the&nbsp;item_id&nbsp;attribute&nbsp;returned&nbsp;in&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;pygame&nbsp;event.<br>
&nbsp;<br>
This&nbsp;class&nbsp;is&nbsp;not&nbsp;intended&nbsp;to&nbsp;be&nbsp;used&nbsp;directly.&nbsp;Use&nbsp;<a href="#PopupMenu">PopupMenu</a>&nbsp;or<br>
<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a>&nbsp;instead,&nbsp;unless&nbsp;designing&nbsp;your&nbsp;own&nbsp;subclass.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="MenuItem-__init__"><strong>__init__</strong></a>(self, text, item_id)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="NonBlockingPopupMenu">class <strong>NonBlockingPopupMenu</strong></a>(<a href="gummworld2.popup_menu.html#PopupMenu">PopupMenu</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>popup_menu.<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a><br>
<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a>(data,&nbsp;pos=None,&nbsp;show=False)&nbsp;:&nbsp;return&nbsp;menu<br>
&nbsp;<br>
data&nbsp;-&gt;&nbsp;list;&nbsp;the&nbsp;list&nbsp;of&nbsp;strings&nbsp;and&nbsp;nested&nbsp;lists.<br>
pos&nbsp;-&gt;&nbsp;tuple;&nbsp;the&nbsp;xy&nbsp;screen&nbsp;coordinate&nbsp;for&nbsp;the&nbsp;topleft&nbsp;of&nbsp;the&nbsp;main&nbsp;menu;&nbsp;if<br>
&nbsp;&nbsp;&nbsp;&nbsp;None,&nbsp;the&nbsp;mouse&nbsp;position&nbsp;is&nbsp;used.<br>
show&nbsp;-&gt;&nbsp;boolean;&nbsp;make&nbsp;the&nbsp;menu&nbsp;visible&nbsp;in&nbsp;the&nbsp;constructor.<br>
&nbsp;<br>
visible&nbsp;is&nbsp;a&nbsp;read-write&nbsp;property&nbsp;that&nbsp;sets&nbsp;and&nbsp;gets&nbsp;the&nbsp;boolean&nbsp;value<br>
representing&nbsp;the&nbsp;state.&nbsp;The&nbsp;<a href="#NonBlockingPopupMenu-show">show</a>()&nbsp;and&nbsp;<a href="#NonBlockingPopupMenu-hide">hide</a>()&nbsp;methods&nbsp;are&nbsp;equivalent<br>
alternatives&nbsp;to&nbsp;using&nbsp;the&nbsp;property.<br>
&nbsp;<br>
Note&nbsp;that&nbsp;the&nbsp;constructor&nbsp;does&nbsp;not&nbsp;copy&nbsp;the&nbsp;data&nbsp;argument.&nbsp;Changes&nbsp;to&nbsp;the<br>
contents&nbsp;will&nbsp;result&nbsp;in&nbsp;changes&nbsp;to&nbsp;the&nbsp;menus&nbsp;once&nbsp;<a href="#NonBlockingPopupMenu-show">show</a>()&nbsp;is&nbsp;called&nbsp;or<br>
visible&nbsp;is&nbsp;set&nbsp;to&nbsp;True.&nbsp;In&nbsp;addition,&nbsp;data&nbsp;can&nbsp;be&nbsp;entirely&nbsp;replaced&nbsp;by<br>
setting&nbsp;menu.init_data.<br>
&nbsp;<br>
High-level&nbsp;steps&nbsp;for&nbsp;a&nbsp;non-blocking&nbsp;menu:<br>
&nbsp;<br>
1.&nbsp;&nbsp;Fashion&nbsp;a&nbsp;nested&nbsp;list&nbsp;of&nbsp;strings&nbsp;for&nbsp;the&nbsp;<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a>&nbsp;constructor.<br>
2.&nbsp;&nbsp;Store&nbsp;the&nbsp;menu&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;in&nbsp;a&nbsp;variable.<br>
3.&nbsp;&nbsp;Construct&nbsp;the&nbsp;<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a>&nbsp;<a href="__builtin__.html#object">object</a>.<br>
4.&nbsp;&nbsp;Detect&nbsp;the&nbsp;condition&nbsp;that&nbsp;triggers&nbsp;the&nbsp;menu&nbsp;to&nbsp;post,&nbsp;and&nbsp;call&nbsp;menu.<a href="#NonBlockingPopupMenu-show">show</a>()<br>
&nbsp;&nbsp;&nbsp;&nbsp;(or&nbsp;set&nbsp;menu.visible=True).<br>
5.&nbsp;&nbsp;Call&nbsp;menu.<a href="#NonBlockingPopupMenu-draw">draw</a>()&nbsp;to&nbsp;draw&nbsp;the&nbsp;menu.&nbsp;If&nbsp;it&nbsp;is&nbsp;visible,&nbsp;it&nbsp;will&nbsp;be&nbsp;drawn.<br>
6.&nbsp;&nbsp;Pass&nbsp;pygame&nbsp;events&nbsp;to&nbsp;menu.<a href="#NonBlockingPopupMenu-handle_events">handle_events</a>()&nbsp;and&nbsp;process&nbsp;the&nbsp;unhandled&nbsp;events<br>
&nbsp;&nbsp;&nbsp;&nbsp;that&nbsp;are&nbsp;returned&nbsp;as&nbsp;you&nbsp;would&nbsp;pygame's&nbsp;events.&nbsp;If&nbsp;the&nbsp;menu&nbsp;is&nbsp;not&nbsp;visible<br>
&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;method&nbsp;will&nbsp;immediately&nbsp;return&nbsp;the&nbsp;list&nbsp;passed&nbsp;in,&nbsp;unchanged.<br>
7.&nbsp;&nbsp;Upon&nbsp;menu&nbsp;exit,&nbsp;one&nbsp;or&nbsp;two&nbsp;USEREVENTs&nbsp;are&nbsp;posted&nbsp;via&nbsp;pygame.&nbsp;Retrieve&nbsp;them<br>
&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;recognize&nbsp;they&nbsp;are&nbsp;menu&nbsp;events&nbsp;(i.e.,&nbsp;event.code=='MENU').<br>
&nbsp;&nbsp;&nbsp;&nbsp;a.&nbsp;&nbsp;A&nbsp;menu-exit&nbsp;event&nbsp;signals&nbsp;the&nbsp;menu&nbsp;has&nbsp;detected&nbsp;an&nbsp;exit&nbsp;condition,&nbsp;which<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;may&nbsp;or&nbsp;many&nbsp;not&nbsp;be&nbsp;accompanied&nbsp;by&nbsp;a&nbsp;menu&nbsp;selection.&nbsp;Recognize&nbsp;this&nbsp;by<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;event.name==None&nbsp;or&nbsp;event.menu_id==-1.&nbsp;Upon&nbsp;receiving&nbsp;this&nbsp;event&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;main&nbsp;loop&nbsp;should&nbsp;call&nbsp;menu.<a href="#NonBlockingPopupMenu-hide">hide</a>()&nbsp;(or&nbsp;set&nbsp;menu.visible=False).<br>
&nbsp;&nbsp;&nbsp;&nbsp;b.&nbsp;&nbsp;A&nbsp;menu-selection&nbsp;event&nbsp;signals&nbsp;the&nbsp;main&nbsp;loop&nbsp;that&nbsp;a&nbsp;menu&nbsp;item&nbsp;was<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selected.&nbsp;Recognize&nbsp;this&nbsp;by&nbsp;event.name=='your&nbsp;menu&nbsp;title'.&nbsp;event.menu_id<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;holds&nbsp;the&nbsp;selected&nbsp;item&nbsp;number,&nbsp;and&nbsp;event.text&nbsp;holds&nbsp;the&nbsp;item&nbsp;label.<br>
8.&nbsp;&nbsp;Destroying&nbsp;the&nbsp;menu&nbsp;is&nbsp;optional.<br>
9.&nbsp;&nbsp;Assigning&nbsp;to&nbsp;menu.init_data,&nbsp;or&nbsp;changing&nbsp;its&nbsp;contents&nbsp;or&nbsp;that&nbsp;of&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;original&nbsp;list&nbsp;variable,&nbsp;will&nbsp;result&nbsp;in&nbsp;a&nbsp;modified&nbsp;menu&nbsp;the&nbsp;next&nbsp;time<br>
&nbsp;&nbsp;&nbsp;&nbsp;menu.<a href="#NonBlockingPopupMenu-show">show</a>()&nbsp;is&nbsp;called&nbsp;(or&nbsp;menu.visible&nbsp;is&nbsp;set&nbsp;to&nbsp;True).<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gummworld2.popup_menu.html#NonBlockingPopupMenu">NonBlockingPopupMenu</a></dd>
<dd><a href="gummworld2.popup_menu.html#PopupMenu">PopupMenu</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="NonBlockingPopupMenu-__init__"><strong>__init__</strong></a>(self, data, pos<font color="#909090">=None</font>, show<font color="#909090">=False</font>)</dt></dl>

<dl><dt><a name="NonBlockingPopupMenu-draw"><strong>draw</strong></a>(self)</dt><dd><tt>preemptively&nbsp;return&nbsp;if&nbsp;the&nbsp;menu&nbsp;is&nbsp;not&nbsp;visible;&nbsp;else,&nbsp;call&nbsp;the<br>
superclass's&nbsp;method.</tt></dd></dl>

<dl><dt><a name="NonBlockingPopupMenu-handle_events"><strong>handle_events</strong></a>(self, events)</dt><dd><tt>preemptively&nbsp;return&nbsp;if&nbsp;the&nbsp;menu&nbsp;is&nbsp;not&nbsp;visible;&nbsp;else,&nbsp;call&nbsp;the<br>
superclass's&nbsp;method.</tt></dd></dl>

<dl><dt><a name="NonBlockingPopupMenu-hide"><strong>hide</strong></a>(self)</dt><dd><tt>destroy&nbsp;the&nbsp;menu&nbsp;geometry&nbsp;and&nbsp;grpahics,&nbsp;and&nbsp;hides&nbsp;the&nbsp;menu</tt></dd></dl>

<dl><dt><a name="NonBlockingPopupMenu-show"><strong>show</strong></a>(self)</dt><dd><tt>generate&nbsp;the&nbsp;menu&nbsp;geometry&nbsp;and&nbsp;graphics,&nbsp;and&nbsp;makes&nbsp;the&nbsp;menu&nbsp;visible</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>visible</strong></dt>
</dl>
<hr>
Data descriptors inherited from <a href="gummworld2.popup_menu.html#PopupMenu">PopupMenu</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="PopupMenu">class <strong>PopupMenu</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>popup_menu.<a href="#PopupMenu">PopupMenu</a><br>
<a href="#PopupMenu">PopupMenu</a>(data,&nbsp;block=True)&nbsp;:&nbsp;return&nbsp;menu<br>
&nbsp;<br>
data&nbsp;-&gt;&nbsp;list;&nbsp;the&nbsp;list&nbsp;of&nbsp;strings&nbsp;and&nbsp;nested&nbsp;lists.<br>
pos&nbsp;-&gt;&nbsp;tuple;&nbsp;the&nbsp;xy&nbsp;screen&nbsp;coordinate&nbsp;for&nbsp;the&nbsp;topleft&nbsp;of&nbsp;the&nbsp;main&nbsp;menu;&nbsp;if<br>
&nbsp;&nbsp;&nbsp;&nbsp;None,&nbsp;the&nbsp;mouse&nbsp;position&nbsp;is&nbsp;used.<br>
block&nbsp;-&gt;&nbsp;boolean;&nbsp;when&nbsp;True&nbsp;popup_menu&nbsp;will&nbsp;run&nbsp;its&nbsp;own&nbsp;event&nbsp;loop,&nbsp;blocking<br>
&nbsp;&nbsp;&nbsp;&nbsp;your&nbsp;main&nbsp;loop&nbsp;until&nbsp;it&nbsp;exits;&nbsp;when&nbsp;False&nbsp;popup_menu.get_events()&nbsp;will<br>
&nbsp;&nbsp;&nbsp;&nbsp;intercept&nbsp;events&nbsp;it&nbsp;cares&nbsp;about&nbsp;and&nbsp;return&nbsp;unhandled&nbsp;events&nbsp;to&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;caller.<br>
&nbsp;<br>
Note:&nbsp;For&nbsp;a&nbsp;non-blocking&nbsp;menu,&nbsp;use&nbsp;the&nbsp;<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a>&nbsp;instead.&nbsp;This<br>
class&nbsp;supports&nbsp;non-blocking,&nbsp;but&nbsp;it&nbsp;is&nbsp;more&nbsp;cumbersome&nbsp;to&nbsp;use&nbsp;than&nbsp;the<br>
<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a>&nbsp;class.<br>
&nbsp;<br>
The&nbsp;first&nbsp;string&nbsp;in&nbsp;the&nbsp;data&nbsp;list&nbsp;is&nbsp;taken&nbsp;as&nbsp;the&nbsp;menu&nbsp;title.&nbsp;The&nbsp;remaining<br>
strings&nbsp;are&nbsp;menu&nbsp;items.&nbsp;A&nbsp;nested&nbsp;list&nbsp;becomes&nbsp;a&nbsp;submenu.&nbsp;Submenu&nbsp;lists&nbsp;must<br>
also&nbsp;contain&nbsp;strings&nbsp;for&nbsp;menu&nbsp;title&nbsp;and&nbsp;menu&nbsp;items.&nbsp;Submenus&nbsp;can&nbsp;be<br>
theoretically&nbsp;infinitely&nbsp;nested.<br>
&nbsp;<br>
The&nbsp;menu&nbsp;runs&nbsp;a&nbsp;mini&nbsp;event&nbsp;loop.&nbsp;This&nbsp;will&nbsp;block&nbsp;the&nbsp;caller&nbsp;until&nbsp;it&nbsp;exits.<br>
Upon&nbsp;exiting,&nbsp;the&nbsp;screen&nbsp;is&nbsp;restored&nbsp;to&nbsp;its&nbsp;prior&nbsp;state.<br>
&nbsp;<br>
Left-clicking&nbsp;outside&nbsp;the&nbsp;topmost&nbsp;menu&nbsp;will&nbsp;quit&nbsp;the&nbsp;entire&nbsp;menu.&nbsp;Right-<br>
clicking&nbsp;anywhere&nbsp;will&nbsp;close&nbsp;the&nbsp;topmost&nbsp;submenu;&nbsp;if&nbsp;only&nbsp;the&nbsp;main&nbsp;menu<br>
remains&nbsp;the&nbsp;menu&nbsp;will&nbsp;exit.&nbsp;Left-clicking&nbsp;a&nbsp;menu&nbsp;item&nbsp;in&nbsp;the&nbsp;topmost&nbsp;menu<br>
will&nbsp;post&nbsp;a&nbsp;USEREVENT&nbsp;for&nbsp;the&nbsp;caller&nbsp;to&nbsp;process.<br>
&nbsp;<br>
The&nbsp;USEREVENT&nbsp;will&nbsp;have&nbsp;attributes:&nbsp;code='MENU',&nbsp;name=popup_menu.name,<br>
item_id=menu_item.item_id,&nbsp;text=menu_item.text.&nbsp;name&nbsp;is&nbsp;first&nbsp;element&nbsp;in&nbsp;a<br>
menu&nbsp;data&nbsp;list.&nbsp;item_id&nbsp;corresponds&nbsp;to&nbsp;the&nbsp;Nth&nbsp;element&nbsp;in&nbsp;a&nbsp;menu&nbsp;data&nbsp;list,<br>
incremented&nbsp;from&nbsp;0;&nbsp;submenu&nbsp;items&nbsp;count&nbsp;as&nbsp;one&nbsp;menu_id&nbsp;even&nbsp;though&nbsp;they&nbsp;are<br>
never&nbsp;posted&nbsp;in&nbsp;an&nbsp;event.&nbsp;text&nbsp;is&nbsp;the&nbsp;string&nbsp;value&nbsp;of&nbsp;the&nbsp;Nth&nbsp;element&nbsp;in&nbsp;the<br>
menu&nbsp;data&nbsp;list.&nbsp;Thus,&nbsp;combinations&nbsp;of&nbsp;name&nbsp;and&nbsp;menu_id&nbsp;or&nbsp;name&nbsp;and&nbsp;text&nbsp;can<br>
be&nbsp;used&nbsp;to&nbsp;uniquely&nbsp;identify&nbsp;menu&nbsp;selections.<br>
&nbsp;<br>
Example&nbsp;menu&nbsp;data&nbsp;and&nbsp;resulting&nbsp;event&nbsp;data:<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;['Main',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;main&nbsp;menu&nbsp;title<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Item&nbsp;0',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;name='Main',&nbsp;menu_id=0,&nbsp;text='Item&nbsp;0'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;['Submenu',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;submenu&nbsp;title<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Item&nbsp;0',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;name='Submenu',&nbsp;menu_id=0,&nbsp;text='Item&nbsp;0'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Item&nbsp;1',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;name='Submenu',&nbsp;menu_id=0,&nbsp;text='Item&nbsp;1'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Item&nbsp;2',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;name='Main',&nbsp;menu_id=2,&nbsp;text='Item&nbsp;2'<br>
&nbsp;&nbsp;&nbsp;&nbsp;]<br>
&nbsp;<br>
High-level&nbsp;steps&nbsp;for&nbsp;a&nbsp;blocking&nbsp;menu:<br>
&nbsp;<br>
1.&nbsp;&nbsp;Fashion&nbsp;a&nbsp;nested&nbsp;list&nbsp;of&nbsp;strings&nbsp;for&nbsp;the&nbsp;<a href="#PopupMenu">PopupMenu</a>&nbsp;constructor.<br>
2.&nbsp;&nbsp;Upon&nbsp;creation,&nbsp;the&nbsp;menu&nbsp;runs&nbsp;its&nbsp;own&nbsp;loop.<br>
3.&nbsp;&nbsp;Upon&nbsp;exit,&nbsp;control&nbsp;is&nbsp;returned&nbsp;to&nbsp;the&nbsp;caller.<br>
4.&nbsp;&nbsp;Handle&nbsp;the&nbsp;resulting&nbsp;USEREVENT&nbsp;event&nbsp;in&nbsp;the&nbsp;caller&nbsp;where<br>
&nbsp;&nbsp;&nbsp;&nbsp;event.name=='your&nbsp;menu&nbsp;title',&nbsp;event.item_id&nbsp;holds&nbsp;the&nbsp;selected&nbsp;item<br>
&nbsp;&nbsp;&nbsp;&nbsp;number,&nbsp;and&nbsp;event.text&nbsp;holds&nbsp;the&nbsp;item&nbsp;label.<br>
&nbsp;<br>
High-level&nbsp;steps&nbsp;for&nbsp;a&nbsp;non-blocking&nbsp;menu:<br>
&nbsp;<br>
Note:&nbsp;This&nbsp;usage&nbsp;exists&nbsp;to&nbsp;support&nbsp;the&nbsp;<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a>&nbsp;class&nbsp;and<br>
custom&nbsp;non-blocking&nbsp;implementations;&nbsp;for&nbsp;typical&nbsp;use&nbsp;<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a><br>
is&nbsp;recommended.<br>
&nbsp;<br>
1.&nbsp;&nbsp;Fashion&nbsp;a&nbsp;nested&nbsp;list&nbsp;of&nbsp;strings&nbsp;for&nbsp;the&nbsp;<a href="#PopupMenu">PopupMenu</a>&nbsp;constructor.<br>
2.&nbsp;&nbsp;Store&nbsp;the&nbsp;menu&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;in&nbsp;a&nbsp;variable.<br>
3.&nbsp;&nbsp;Devise&nbsp;a&nbsp;means&nbsp;for&nbsp;the&nbsp;main&nbsp;loop&nbsp;to&nbsp;choose&nbsp;whether&nbsp;to&nbsp;draw&nbsp;the&nbsp;menu&nbsp;and&nbsp;pass<br>
&nbsp;&nbsp;&nbsp;&nbsp;it&nbsp;events.<br>
4.&nbsp;&nbsp;Call&nbsp;menu.<a href="#PopupMenu-draw">draw</a>()&nbsp;to&nbsp;draw&nbsp;the&nbsp;menu.<br>
5.&nbsp;&nbsp;Pass&nbsp;pygame&nbsp;events&nbsp;to&nbsp;menu.<a href="#PopupMenu-handle_events">handle_events</a>()&nbsp;and&nbsp;process&nbsp;the&nbsp;unhandled&nbsp;events<br>
&nbsp;&nbsp;&nbsp;&nbsp;that&nbsp;are&nbsp;returned&nbsp;as&nbsp;you&nbsp;would&nbsp;pygame's&nbsp;events.<br>
6.&nbsp;&nbsp;Upon&nbsp;menu&nbsp;exit,&nbsp;one&nbsp;or&nbsp;two&nbsp;USEREVENTs&nbsp;are&nbsp;posted&nbsp;via&nbsp;pygame.&nbsp;Retrieve<br>
&nbsp;&nbsp;&nbsp;&nbsp;them&nbsp;and&nbsp;recognize&nbsp;they&nbsp;are&nbsp;menu&nbsp;events&nbsp;(event.code=='MENU').<br>
&nbsp;&nbsp;&nbsp;&nbsp;a.&nbsp;&nbsp;The&nbsp;menu-exit&nbsp;event&nbsp;signals&nbsp;the&nbsp;main&nbsp;loop&nbsp;it&nbsp;has&nbsp;exited,&nbsp;with&nbsp;or<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;without&nbsp;a&nbsp;menu&nbsp;selection.&nbsp;Recognize&nbsp;this&nbsp;by&nbsp;event.name==None.&nbsp;Upon<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receiving&nbsp;this&nbsp;event&nbsp;the&nbsp;main&nbsp;loop&nbsp;should&nbsp;stop&nbsp;using&nbsp;the&nbsp;menu's<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#PopupMenu-draw">draw</a>()&nbsp;and&nbsp;get_events()&nbsp;(until&nbsp;the&nbsp;next&nbsp;time&nbsp;it&nbsp;wants&nbsp;to&nbsp;post&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;menu&nbsp;to&nbsp;the&nbsp;user).<br>
&nbsp;&nbsp;&nbsp;&nbsp;b.&nbsp;&nbsp;The&nbsp;menu-selection&nbsp;event&nbsp;signals&nbsp;the&nbsp;main&nbsp;loop&nbsp;that&nbsp;a&nbsp;menu&nbsp;item&nbsp;was<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selected.&nbsp;Recognize&nbsp;this&nbsp;by&nbsp;event.name=='your&nbsp;menu&nbsp;title'.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;event.menu_id&nbsp;holds&nbsp;the&nbsp;selected&nbsp;item&nbsp;number,&nbsp;and&nbsp;event.text&nbsp;holds<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;item&nbsp;label.<br>
7.&nbsp;&nbsp;Destroying&nbsp;the&nbsp;menu&nbsp;is&nbsp;not&nbsp;necessary.&nbsp;But&nbsp;creating&nbsp;and&nbsp;destroying&nbsp;it&nbsp;may<br>
&nbsp;&nbsp;&nbsp;&nbsp;be&nbsp;a&nbsp;convenient&nbsp;means&nbsp;to&nbsp;manage&nbsp;the&nbsp;menu&nbsp;state&nbsp;(i.e.&nbsp;to&nbsp;post&nbsp;it&nbsp;or&nbsp;not).<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="PopupMenu-__init__"><strong>__init__</strong></a>(self, data, pos<font color="#909090">=None</font>, block<font color="#909090">=True</font>)</dt></dl>

<dl><dt><a name="PopupMenu-draw"><strong>draw</strong></a>(self)</dt></dl>

<dl><dt><a name="PopupMenu-handle_events"><strong>handle_events</strong></a>(self, events, block<font color="#909090">=False</font>)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SubmenuLabel">class <strong>SubmenuLabel</strong></a>(<a href="__builtin__.html#str">__builtin__.str</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>popup_menu.<a href="#SubmenuLabel">SubmenuLabel</a><br>
<a href="#SubmenuLabel">SubmenuLabel</a>(s)&nbsp;:&nbsp;return&nbsp;label<br>
&nbsp;<br>
s&nbsp;-&gt;&nbsp;<a href="__builtin__.html#str">str</a>;&nbsp;the&nbsp;label&nbsp;text<br>
&nbsp;<br>
This&nbsp;is&nbsp;a&nbsp;helper&nbsp;class&nbsp;for&nbsp;strong-typing&nbsp;of&nbsp;submenu&nbsp;labels.<br>
&nbsp;<br>
This&nbsp;class&nbsp;is&nbsp;not&nbsp;intended&nbsp;to&nbsp;be&nbsp;used&nbsp;directly.&nbsp;See&nbsp;<a href="#PopupMenu">PopupMenu</a>&nbsp;or<br>
<a href="#NonBlockingPopupMenu">NonBlockingPopupMenu</a>.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gummworld2.popup_menu.html#SubmenuLabel">SubmenuLabel</a></dd>
<dd><a href="__builtin__.html#str">__builtin__.str</a></dd>
<dd><a href="__builtin__.html#basestring">__builtin__.basestring</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Static methods defined here:<br>
<dl><dt><a name="SubmenuLabel-__new__"><strong>__new__</strong></a>(cls, s)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="__builtin__.html#str">__builtin__.str</a>:<br>
<dl><dt><a name="SubmenuLabel-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__add__">__add__</a>(y)&nbsp;&lt;==&gt;&nbsp;x+y</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__contains__">__contains__</a>(y)&nbsp;&lt;==&gt;&nbsp;y&nbsp;in&nbsp;x</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__eq__">__eq__</a>(y)&nbsp;&lt;==&gt;&nbsp;x==y</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__format__"><strong>__format__</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-__format__">__format__</a>(format_spec)&nbsp;-&gt;&nbsp;string</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__ge__">__ge__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;=y</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__getnewargs__"><strong>__getnewargs__</strong></a>(...)</dt></dl>

<dl><dt><a name="SubmenuLabel-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__gt__">__gt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;y</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__hash__">__hash__</a>()&nbsp;&lt;==&gt;&nbsp;hash(x)</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__le__">__le__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;=y</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__len__">__len__</a>()&nbsp;&lt;==&gt;&nbsp;len(x)</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__lt__">__lt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;y</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__mod__"><strong>__mod__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__mod__">__mod__</a>(y)&nbsp;&lt;==&gt;&nbsp;x%y</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__mul__">__mul__</a>(n)&nbsp;&lt;==&gt;&nbsp;x*n</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__ne__">__ne__</a>(y)&nbsp;&lt;==&gt;&nbsp;x!=y</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__rmod__"><strong>__rmod__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__rmod__">__rmod__</a>(y)&nbsp;&lt;==&gt;&nbsp;y%x</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__rmul__">__rmul__</a>(n)&nbsp;&lt;==&gt;&nbsp;n*x</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__sizeof__"><strong>__sizeof__</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-__sizeof__">__sizeof__</a>()&nbsp;-&gt;&nbsp;size&nbsp;of&nbsp;S&nbsp;in&nbsp;memory,&nbsp;in&nbsp;bytes</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#SubmenuLabel-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;<a href="__builtin__.html#str">str</a>(x)</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-capitalize"><strong>capitalize</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-capitalize">capitalize</a>()&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;string&nbsp;S&nbsp;with&nbsp;only&nbsp;its&nbsp;first&nbsp;character<br>
capitalized.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-center"><strong>center</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-center">center</a>(width[,&nbsp;fillchar])&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;S&nbsp;centered&nbsp;in&nbsp;a&nbsp;string&nbsp;of&nbsp;length&nbsp;width.&nbsp;Padding&nbsp;is<br>
done&nbsp;using&nbsp;the&nbsp;specified&nbsp;fill&nbsp;character&nbsp;(default&nbsp;is&nbsp;a&nbsp;space)</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-count"><strong>count</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-count">count</a>(sub[,&nbsp;start[,&nbsp;end]])&nbsp;-&gt;&nbsp;int<br>
&nbsp;<br>
Return&nbsp;the&nbsp;number&nbsp;of&nbsp;non-overlapping&nbsp;occurrences&nbsp;of&nbsp;substring&nbsp;sub&nbsp;in<br>
string&nbsp;S[start:end].&nbsp;&nbsp;Optional&nbsp;arguments&nbsp;start&nbsp;and&nbsp;end&nbsp;are&nbsp;interpreted<br>
as&nbsp;in&nbsp;slice&nbsp;notation.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-decode"><strong>decode</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-decode">decode</a>([encoding[,errors]])&nbsp;-&gt;&nbsp;<a href="__builtin__.html#object">object</a><br>
&nbsp;<br>
Decodes&nbsp;S&nbsp;using&nbsp;the&nbsp;codec&nbsp;registered&nbsp;for&nbsp;encoding.&nbsp;encoding&nbsp;defaults<br>
to&nbsp;the&nbsp;default&nbsp;encoding.&nbsp;errors&nbsp;may&nbsp;be&nbsp;given&nbsp;to&nbsp;set&nbsp;a&nbsp;different&nbsp;error<br>
handling&nbsp;scheme.&nbsp;Default&nbsp;is&nbsp;'strict'&nbsp;meaning&nbsp;that&nbsp;encoding&nbsp;errors&nbsp;raise<br>
a&nbsp;UnicodeDecodeError.&nbsp;Other&nbsp;possible&nbsp;values&nbsp;are&nbsp;'ignore'&nbsp;and&nbsp;'replace'<br>
as&nbsp;well&nbsp;as&nbsp;any&nbsp;other&nbsp;name&nbsp;registered&nbsp;with&nbsp;codecs.register_error&nbsp;that&nbsp;is<br>
able&nbsp;to&nbsp;handle&nbsp;UnicodeDecodeErrors.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-encode"><strong>encode</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-encode">encode</a>([encoding[,errors]])&nbsp;-&gt;&nbsp;<a href="__builtin__.html#object">object</a><br>
&nbsp;<br>
Encodes&nbsp;S&nbsp;using&nbsp;the&nbsp;codec&nbsp;registered&nbsp;for&nbsp;encoding.&nbsp;encoding&nbsp;defaults<br>
to&nbsp;the&nbsp;default&nbsp;encoding.&nbsp;errors&nbsp;may&nbsp;be&nbsp;given&nbsp;to&nbsp;set&nbsp;a&nbsp;different&nbsp;error<br>
handling&nbsp;scheme.&nbsp;Default&nbsp;is&nbsp;'strict'&nbsp;meaning&nbsp;that&nbsp;encoding&nbsp;errors&nbsp;raise<br>
a&nbsp;UnicodeEncodeError.&nbsp;Other&nbsp;possible&nbsp;values&nbsp;are&nbsp;'ignore',&nbsp;'replace'&nbsp;and<br>
'xmlcharrefreplace'&nbsp;as&nbsp;well&nbsp;as&nbsp;any&nbsp;other&nbsp;name&nbsp;registered&nbsp;with<br>
codecs.register_error&nbsp;that&nbsp;is&nbsp;able&nbsp;to&nbsp;handle&nbsp;UnicodeEncodeErrors.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-endswith"><strong>endswith</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-endswith">endswith</a>(suffix[,&nbsp;start[,&nbsp;end]])&nbsp;-&gt;&nbsp;bool<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;S&nbsp;ends&nbsp;with&nbsp;the&nbsp;specified&nbsp;suffix,&nbsp;False&nbsp;otherwise.<br>
With&nbsp;optional&nbsp;start,&nbsp;test&nbsp;S&nbsp;beginning&nbsp;at&nbsp;that&nbsp;position.<br>
With&nbsp;optional&nbsp;end,&nbsp;stop&nbsp;comparing&nbsp;S&nbsp;at&nbsp;that&nbsp;position.<br>
suffix&nbsp;can&nbsp;also&nbsp;be&nbsp;a&nbsp;tuple&nbsp;of&nbsp;strings&nbsp;to&nbsp;try.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-expandtabs"><strong>expandtabs</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-expandtabs">expandtabs</a>([tabsize])&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;a&nbsp;copy&nbsp;of&nbsp;S&nbsp;where&nbsp;all&nbsp;tab&nbsp;characters&nbsp;are&nbsp;expanded&nbsp;using&nbsp;spaces.<br>
If&nbsp;tabsize&nbsp;is&nbsp;not&nbsp;given,&nbsp;a&nbsp;tab&nbsp;size&nbsp;of&nbsp;8&nbsp;characters&nbsp;is&nbsp;assumed.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-find"><strong>find</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-find">find</a>(sub&nbsp;[,start&nbsp;[,end]])&nbsp;-&gt;&nbsp;int<br>
&nbsp;<br>
Return&nbsp;the&nbsp;lowest&nbsp;index&nbsp;in&nbsp;S&nbsp;where&nbsp;substring&nbsp;sub&nbsp;is&nbsp;found,<br>
such&nbsp;that&nbsp;sub&nbsp;is&nbsp;contained&nbsp;within&nbsp;s[start:end].&nbsp;&nbsp;Optional<br>
arguments&nbsp;start&nbsp;and&nbsp;end&nbsp;are&nbsp;interpreted&nbsp;as&nbsp;in&nbsp;slice&nbsp;notation.<br>
&nbsp;<br>
Return&nbsp;-1&nbsp;on&nbsp;failure.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-format"><strong>format</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-format">format</a>(*args,&nbsp;**kwargs)&nbsp;-&gt;&nbsp;string</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-index"><strong>index</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-index">index</a>(sub&nbsp;[,start&nbsp;[,end]])&nbsp;-&gt;&nbsp;int<br>
&nbsp;<br>
Like&nbsp;S.<a href="#SubmenuLabel-find">find</a>()&nbsp;but&nbsp;raise&nbsp;ValueError&nbsp;when&nbsp;the&nbsp;substring&nbsp;is&nbsp;not&nbsp;found.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-isalnum"><strong>isalnum</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-isalnum">isalnum</a>()&nbsp;-&gt;&nbsp;bool<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;all&nbsp;characters&nbsp;in&nbsp;S&nbsp;are&nbsp;alphanumeric<br>
and&nbsp;there&nbsp;is&nbsp;at&nbsp;least&nbsp;one&nbsp;character&nbsp;in&nbsp;S,&nbsp;False&nbsp;otherwise.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-isalpha"><strong>isalpha</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-isalpha">isalpha</a>()&nbsp;-&gt;&nbsp;bool<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;all&nbsp;characters&nbsp;in&nbsp;S&nbsp;are&nbsp;alphabetic<br>
and&nbsp;there&nbsp;is&nbsp;at&nbsp;least&nbsp;one&nbsp;character&nbsp;in&nbsp;S,&nbsp;False&nbsp;otherwise.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-isdigit"><strong>isdigit</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-isdigit">isdigit</a>()&nbsp;-&gt;&nbsp;bool<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;all&nbsp;characters&nbsp;in&nbsp;S&nbsp;are&nbsp;digits<br>
and&nbsp;there&nbsp;is&nbsp;at&nbsp;least&nbsp;one&nbsp;character&nbsp;in&nbsp;S,&nbsp;False&nbsp;otherwise.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-islower"><strong>islower</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-islower">islower</a>()&nbsp;-&gt;&nbsp;bool<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;all&nbsp;cased&nbsp;characters&nbsp;in&nbsp;S&nbsp;are&nbsp;lowercase&nbsp;and&nbsp;there&nbsp;is<br>
at&nbsp;least&nbsp;one&nbsp;cased&nbsp;character&nbsp;in&nbsp;S,&nbsp;False&nbsp;otherwise.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-isspace"><strong>isspace</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-isspace">isspace</a>()&nbsp;-&gt;&nbsp;bool<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;all&nbsp;characters&nbsp;in&nbsp;S&nbsp;are&nbsp;whitespace<br>
and&nbsp;there&nbsp;is&nbsp;at&nbsp;least&nbsp;one&nbsp;character&nbsp;in&nbsp;S,&nbsp;False&nbsp;otherwise.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-istitle"><strong>istitle</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-istitle">istitle</a>()&nbsp;-&gt;&nbsp;bool<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;S&nbsp;is&nbsp;a&nbsp;titlecased&nbsp;string&nbsp;and&nbsp;there&nbsp;is&nbsp;at&nbsp;least&nbsp;one<br>
character&nbsp;in&nbsp;S,&nbsp;i.e.&nbsp;uppercase&nbsp;characters&nbsp;may&nbsp;only&nbsp;follow&nbsp;uncased<br>
characters&nbsp;and&nbsp;lowercase&nbsp;characters&nbsp;only&nbsp;cased&nbsp;ones.&nbsp;Return&nbsp;False<br>
otherwise.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-isupper"><strong>isupper</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-isupper">isupper</a>()&nbsp;-&gt;&nbsp;bool<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;all&nbsp;cased&nbsp;characters&nbsp;in&nbsp;S&nbsp;are&nbsp;uppercase&nbsp;and&nbsp;there&nbsp;is<br>
at&nbsp;least&nbsp;one&nbsp;cased&nbsp;character&nbsp;in&nbsp;S,&nbsp;False&nbsp;otherwise.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-join"><strong>join</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-join">join</a>(iterable)&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;a&nbsp;string&nbsp;which&nbsp;is&nbsp;the&nbsp;concatenation&nbsp;of&nbsp;the&nbsp;strings&nbsp;in&nbsp;the<br>
iterable.&nbsp;&nbsp;The&nbsp;separator&nbsp;between&nbsp;elements&nbsp;is&nbsp;S.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-ljust"><strong>ljust</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-ljust">ljust</a>(width[,&nbsp;fillchar])&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;S&nbsp;left-justified&nbsp;in&nbsp;a&nbsp;string&nbsp;of&nbsp;length&nbsp;width.&nbsp;Padding&nbsp;is<br>
done&nbsp;using&nbsp;the&nbsp;specified&nbsp;fill&nbsp;character&nbsp;(default&nbsp;is&nbsp;a&nbsp;space).</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-lower"><strong>lower</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-lower">lower</a>()&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;string&nbsp;S&nbsp;converted&nbsp;to&nbsp;lowercase.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-lstrip"><strong>lstrip</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-lstrip">lstrip</a>([chars])&nbsp;-&gt;&nbsp;string&nbsp;or&nbsp;unicode<br>
&nbsp;<br>
Return&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;string&nbsp;S&nbsp;with&nbsp;leading&nbsp;whitespace&nbsp;removed.<br>
If&nbsp;chars&nbsp;is&nbsp;given&nbsp;and&nbsp;not&nbsp;None,&nbsp;remove&nbsp;characters&nbsp;in&nbsp;chars&nbsp;instead.<br>
If&nbsp;chars&nbsp;is&nbsp;unicode,&nbsp;S&nbsp;will&nbsp;be&nbsp;converted&nbsp;to&nbsp;unicode&nbsp;before&nbsp;stripping</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-partition"><strong>partition</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-partition">partition</a>(sep)&nbsp;-&gt;&nbsp;(head,&nbsp;sep,&nbsp;tail)<br>
&nbsp;<br>
Search&nbsp;for&nbsp;the&nbsp;separator&nbsp;sep&nbsp;in&nbsp;S,&nbsp;and&nbsp;return&nbsp;the&nbsp;part&nbsp;before&nbsp;it,<br>
the&nbsp;separator&nbsp;itself,&nbsp;and&nbsp;the&nbsp;part&nbsp;after&nbsp;it.&nbsp;&nbsp;If&nbsp;the&nbsp;separator&nbsp;is&nbsp;not<br>
found,&nbsp;return&nbsp;S&nbsp;and&nbsp;two&nbsp;empty&nbsp;strings.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-replace"><strong>replace</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-replace">replace</a>(old,&nbsp;new[,&nbsp;count])&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;a&nbsp;copy&nbsp;of&nbsp;string&nbsp;S&nbsp;with&nbsp;all&nbsp;occurrences&nbsp;of&nbsp;substring<br>
old&nbsp;replaced&nbsp;by&nbsp;new.&nbsp;&nbsp;If&nbsp;the&nbsp;optional&nbsp;argument&nbsp;count&nbsp;is<br>
given,&nbsp;only&nbsp;the&nbsp;first&nbsp;count&nbsp;occurrences&nbsp;are&nbsp;replaced.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-rfind"><strong>rfind</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-rfind">rfind</a>(sub&nbsp;[,start&nbsp;[,end]])&nbsp;-&gt;&nbsp;int<br>
&nbsp;<br>
Return&nbsp;the&nbsp;highest&nbsp;index&nbsp;in&nbsp;S&nbsp;where&nbsp;substring&nbsp;sub&nbsp;is&nbsp;found,<br>
such&nbsp;that&nbsp;sub&nbsp;is&nbsp;contained&nbsp;within&nbsp;s[start:end].&nbsp;&nbsp;Optional<br>
arguments&nbsp;start&nbsp;and&nbsp;end&nbsp;are&nbsp;interpreted&nbsp;as&nbsp;in&nbsp;slice&nbsp;notation.<br>
&nbsp;<br>
Return&nbsp;-1&nbsp;on&nbsp;failure.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-rindex"><strong>rindex</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-rindex">rindex</a>(sub&nbsp;[,start&nbsp;[,end]])&nbsp;-&gt;&nbsp;int<br>
&nbsp;<br>
Like&nbsp;S.<a href="#SubmenuLabel-rfind">rfind</a>()&nbsp;but&nbsp;raise&nbsp;ValueError&nbsp;when&nbsp;the&nbsp;substring&nbsp;is&nbsp;not&nbsp;found.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-rjust"><strong>rjust</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-rjust">rjust</a>(width[,&nbsp;fillchar])&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;S&nbsp;right-justified&nbsp;in&nbsp;a&nbsp;string&nbsp;of&nbsp;length&nbsp;width.&nbsp;Padding&nbsp;is<br>
done&nbsp;using&nbsp;the&nbsp;specified&nbsp;fill&nbsp;character&nbsp;(default&nbsp;is&nbsp;a&nbsp;space)</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-rpartition"><strong>rpartition</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-rpartition">rpartition</a>(sep)&nbsp;-&gt;&nbsp;(head,&nbsp;sep,&nbsp;tail)<br>
&nbsp;<br>
Search&nbsp;for&nbsp;the&nbsp;separator&nbsp;sep&nbsp;in&nbsp;S,&nbsp;starting&nbsp;at&nbsp;the&nbsp;end&nbsp;of&nbsp;S,&nbsp;and&nbsp;return<br>
the&nbsp;part&nbsp;before&nbsp;it,&nbsp;the&nbsp;separator&nbsp;itself,&nbsp;and&nbsp;the&nbsp;part&nbsp;after&nbsp;it.&nbsp;&nbsp;If&nbsp;the<br>
separator&nbsp;is&nbsp;not&nbsp;found,&nbsp;return&nbsp;two&nbsp;empty&nbsp;strings&nbsp;and&nbsp;S.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-rsplit"><strong>rsplit</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-rsplit">rsplit</a>([sep&nbsp;[,maxsplit]])&nbsp;-&gt;&nbsp;list&nbsp;of&nbsp;strings<br>
&nbsp;<br>
Return&nbsp;a&nbsp;list&nbsp;of&nbsp;the&nbsp;words&nbsp;in&nbsp;the&nbsp;string&nbsp;S,&nbsp;using&nbsp;sep&nbsp;as&nbsp;the<br>
delimiter&nbsp;string,&nbsp;starting&nbsp;at&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;string&nbsp;and&nbsp;working<br>
to&nbsp;the&nbsp;front.&nbsp;&nbsp;If&nbsp;maxsplit&nbsp;is&nbsp;given,&nbsp;at&nbsp;most&nbsp;maxsplit&nbsp;splits&nbsp;are<br>
done.&nbsp;If&nbsp;sep&nbsp;is&nbsp;not&nbsp;specified&nbsp;or&nbsp;is&nbsp;None,&nbsp;any&nbsp;whitespace&nbsp;string<br>
is&nbsp;a&nbsp;separator.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-rstrip"><strong>rstrip</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-rstrip">rstrip</a>([chars])&nbsp;-&gt;&nbsp;string&nbsp;or&nbsp;unicode<br>
&nbsp;<br>
Return&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;string&nbsp;S&nbsp;with&nbsp;trailing&nbsp;whitespace&nbsp;removed.<br>
If&nbsp;chars&nbsp;is&nbsp;given&nbsp;and&nbsp;not&nbsp;None,&nbsp;remove&nbsp;characters&nbsp;in&nbsp;chars&nbsp;instead.<br>
If&nbsp;chars&nbsp;is&nbsp;unicode,&nbsp;S&nbsp;will&nbsp;be&nbsp;converted&nbsp;to&nbsp;unicode&nbsp;before&nbsp;stripping</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-split"><strong>split</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-split">split</a>([sep&nbsp;[,maxsplit]])&nbsp;-&gt;&nbsp;list&nbsp;of&nbsp;strings<br>
&nbsp;<br>
Return&nbsp;a&nbsp;list&nbsp;of&nbsp;the&nbsp;words&nbsp;in&nbsp;the&nbsp;string&nbsp;S,&nbsp;using&nbsp;sep&nbsp;as&nbsp;the<br>
delimiter&nbsp;string.&nbsp;&nbsp;If&nbsp;maxsplit&nbsp;is&nbsp;given,&nbsp;at&nbsp;most&nbsp;maxsplit<br>
splits&nbsp;are&nbsp;done.&nbsp;If&nbsp;sep&nbsp;is&nbsp;not&nbsp;specified&nbsp;or&nbsp;is&nbsp;None,&nbsp;any<br>
whitespace&nbsp;string&nbsp;is&nbsp;a&nbsp;separator&nbsp;and&nbsp;empty&nbsp;strings&nbsp;are&nbsp;removed<br>
from&nbsp;the&nbsp;result.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-splitlines"><strong>splitlines</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-splitlines">splitlines</a>([keepends])&nbsp;-&gt;&nbsp;list&nbsp;of&nbsp;strings<br>
&nbsp;<br>
Return&nbsp;a&nbsp;list&nbsp;of&nbsp;the&nbsp;lines&nbsp;in&nbsp;S,&nbsp;breaking&nbsp;at&nbsp;line&nbsp;boundaries.<br>
Line&nbsp;breaks&nbsp;are&nbsp;not&nbsp;included&nbsp;in&nbsp;the&nbsp;resulting&nbsp;list&nbsp;unless&nbsp;keepends<br>
is&nbsp;given&nbsp;and&nbsp;true.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-startswith"><strong>startswith</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-startswith">startswith</a>(prefix[,&nbsp;start[,&nbsp;end]])&nbsp;-&gt;&nbsp;bool<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;S&nbsp;starts&nbsp;with&nbsp;the&nbsp;specified&nbsp;prefix,&nbsp;False&nbsp;otherwise.<br>
With&nbsp;optional&nbsp;start,&nbsp;test&nbsp;S&nbsp;beginning&nbsp;at&nbsp;that&nbsp;position.<br>
With&nbsp;optional&nbsp;end,&nbsp;stop&nbsp;comparing&nbsp;S&nbsp;at&nbsp;that&nbsp;position.<br>
prefix&nbsp;can&nbsp;also&nbsp;be&nbsp;a&nbsp;tuple&nbsp;of&nbsp;strings&nbsp;to&nbsp;try.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-strip"><strong>strip</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-strip">strip</a>([chars])&nbsp;-&gt;&nbsp;string&nbsp;or&nbsp;unicode<br>
&nbsp;<br>
Return&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;string&nbsp;S&nbsp;with&nbsp;leading&nbsp;and&nbsp;trailing<br>
whitespace&nbsp;removed.<br>
If&nbsp;chars&nbsp;is&nbsp;given&nbsp;and&nbsp;not&nbsp;None,&nbsp;remove&nbsp;characters&nbsp;in&nbsp;chars&nbsp;instead.<br>
If&nbsp;chars&nbsp;is&nbsp;unicode,&nbsp;S&nbsp;will&nbsp;be&nbsp;converted&nbsp;to&nbsp;unicode&nbsp;before&nbsp;stripping</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-swapcase"><strong>swapcase</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-swapcase">swapcase</a>()&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;string&nbsp;S&nbsp;with&nbsp;uppercase&nbsp;characters<br>
converted&nbsp;to&nbsp;lowercase&nbsp;and&nbsp;vice&nbsp;versa.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-title"><strong>title</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-title">title</a>()&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;a&nbsp;titlecased&nbsp;version&nbsp;of&nbsp;S,&nbsp;i.e.&nbsp;words&nbsp;start&nbsp;with&nbsp;uppercase<br>
characters,&nbsp;all&nbsp;remaining&nbsp;cased&nbsp;characters&nbsp;have&nbsp;lowercase.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-translate"><strong>translate</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-translate">translate</a>(table&nbsp;[,deletechars])&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;string&nbsp;S,&nbsp;where&nbsp;all&nbsp;characters&nbsp;occurring<br>
in&nbsp;the&nbsp;optional&nbsp;argument&nbsp;deletechars&nbsp;are&nbsp;removed,&nbsp;and&nbsp;the<br>
remaining&nbsp;characters&nbsp;have&nbsp;been&nbsp;mapped&nbsp;through&nbsp;the&nbsp;given<br>
translation&nbsp;table,&nbsp;which&nbsp;must&nbsp;be&nbsp;a&nbsp;string&nbsp;of&nbsp;length&nbsp;256.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-upper"><strong>upper</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-upper">upper</a>()&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Return&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;string&nbsp;S&nbsp;converted&nbsp;to&nbsp;uppercase.</tt></dd></dl>

<dl><dt><a name="SubmenuLabel-zfill"><strong>zfill</strong></a>(...)</dt><dd><tt>S.<a href="#SubmenuLabel-zfill">zfill</a>(width)&nbsp;-&gt;&nbsp;string<br>
&nbsp;<br>
Pad&nbsp;a&nbsp;numeric&nbsp;string&nbsp;S&nbsp;with&nbsp;zeros&nbsp;on&nbsp;the&nbsp;left,&nbsp;to&nbsp;fill&nbsp;a&nbsp;field<br>
of&nbsp;the&nbsp;specified&nbsp;width.&nbsp;&nbsp;The&nbsp;string&nbsp;S&nbsp;is&nbsp;never&nbsp;truncated.</tt></dd></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>MOUSEBUTTONDOWN</strong> = 5<br>
<strong>MOUSEBUTTONUP</strong> = 6<br>
<strong>MOUSEMOTION</strong> = 4<br>
<strong>USEREVENT</strong> = 24<br>
<strong>__author__</strong> = 'Gummbum, (c) 2011-2013'<br>
<strong>__version__</strong> = '$Id: popup_menu.py 407 2013-08-12 15:11:30Z stabbingfinger@gmail.com $'<br>
<strong>bg_color</strong> = (190, 190, 190, 255)<br>
<strong>font</strong> = &lt;pygame.font.Font object&gt;<br>
<strong>glint_color</strong> = (220, 220, 220, 255)<br>
<strong>hi_color</strong> = (155, 155, 155, 255)<br>
<strong>margin</strong> = 2<br>
<strong>shadow_color</strong> = (105, 105, 105, 255)<br>
<strong>text_color</strong> = (0, 0, 0, 255)</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Gummbum,&nbsp;(c)&nbsp;2011-2013</td></tr></table>
</body></html>